﻿#region Imports
using System.Collections.ObjectModel;
using CommonUtilities.Extensions;
using CommonUtilities.Util;
using DirectoryAnalyzer.Models;
#endregion

namespace DirectoryAnalyzer.Controls.ViewModels
{
    /// <summary>
    /// ViewModel for DuplicateFileBox control
    /// </summary>
    public class DuplicateFileViewModel : BaseViewModel
    {
        #region Properties
        /// <summary>
        /// Supporting property variable to hold all duplicate files
        /// </summary>
        private ObservableCollection<DuplicateFiles> allDuplicates = new ObservableCollection<DuplicateFiles>();
        /// <summary>
        /// Contains all duplicate files
        /// </summary>
        public ObservableCollection<DuplicateFiles> AllDuplicates
        {
            get { return allDuplicates; }
            set { allDuplicates = value.ToObservableCollection(); RaisePropertyChanged("AllDuplicates"); }
        }

        /// <summary>
        /// Supporting property variable to hold flag to display using custom/Accordion control
        /// </summary>
        private bool showCustom;
        /// <summary>
        /// TRUE: Displays custom control
        /// <para>FALSE: Display using Accordion control</para>
        /// </summary>
        public bool ShowCustom
        {
            get { return showCustom; }
            set { showCustom = value; RaisePropertyChanged("ShowCustom"); }
        }
        #endregion

        #region Constructors
        /// <summary>
        /// Default constructor
        /// </summary>
        public DuplicateFileViewModel()
        {
            ShowCustom = true;
        }
        #endregion
    }
}
